num = (1, 2, 3, 4)

count = 0

for i in num:

    for j in num:

        for k in num:

            if i != j and i != k and j != k:
                count = count + 1

                print('result is : %d' % (i * 100 + j * 10 + k))

print('count is %d' % (count))